home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Tele / C / Comet2.1.3.sit / Comet / nnr.c < prev    next >
MacBinary  |  1991-09-03  |  2.4 KB  |  [TEXT/dumv]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: nnr.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
10% dexvert Jesper Olsen Module (music/jesperOlsen) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Sep 3 17:09:29 1991, modified Tue Sep 3 17:09:29 1991, creator 'dumv', type ASCII, 1799 bytes "nnr.c" , at 0x787 382 bytes resource default (weak)
99% file data default
49% TrID Macintosh plain text (MacBinary) default
33% TrID TTComp archive compressed (bin-2K) default (weak)
16% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[dumv]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 05 6e 6e 72 2e 63 00 | 00 00 00 00 00 00 00 00 |..nnr.c.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 64 75 6d | 76 00 00 00 00 00 00 00 |.TEXTdum|v.......|
|00000050| 00 00 00 00 00 07 07 00 | 00 01 7e a4 e9 aa 89 a4 |........|..~.....|
|00000060| e9 aa 89 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 10 7b 00 00 |........|.....{..|
|00000080| 2f 2a 0d 09 43 6f 70 79 | 72 69 67 68 74 20 43 6f |/*..Copy|right Co|
|00000090| 72 6e 65 6c 6c 20 55 6e | 69 76 65 72 73 69 74 79 |rnell Un|iversity|
|000000a0| 20 31 39 38 36 2e 20 20 | 41 6c 6c 20 72 69 67 68 | 1986. |All righ|
|000000b0| 74 73 20 61 72 65 20 72 | 65 73 65 72 76 65 64 2e |ts are r|eserved.|
|000000c0| 0d 0d 09 6e 6e 72 2e 63 | 20 63 6f 6e 74 61 69 6e |...nnr.c| contain|
|000000d0| 73 20 72 6f 75 74 69 6e | 65 73 20 77 68 69 63 68 |s routin|es which|
|000000e0| 20 64 69 73 70 6c 61 79 | 20 61 20 22 4e 65 74 77 | display| a "Netw|
|000000f0| 6f 72 6b 20 6e 6f 74 20 | 72 65 73 70 6f 6e 64 69 |ork not |respondi|
|00000100| 6e 67 22 0d 09 6d 6f 64 | 65 6c 65 73 73 20 64 69 |ng"..mod|eless di|
|00000110| 61 6c 6f 67 2e 0d 09 0d | 2a 2f 0d 0d 23 69 6e 63 |alog....|*/..#inc|
|00000120| 6c 75 64 65 20 3c 65 6d | 2e 68 3e 0d 0d 23 69 6e |lude <em|.h>..#in|
|00000130| 63 6c 75 64 65 20 3c 72 | 63 6f 64 65 73 2e 68 3e |clude <r|codes.h>|
|00000140| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 72 65 73 64 65 |.#includ|e <resde|
|00000150| 66 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |fs.h>.#i|nclude <|
|00000160| 68 31 39 2e 68 3e 0d 0d | 23 69 6e 63 6c 75 64 65 |h19.h>..|#include|
|00000170| 20 3c 6e 65 74 2e 68 3e | 0d 0d 44 69 61 6c 6f 67 | <net.h>|..Dialog|
|00000180| 50 74 72 20 6e 6e 72 64 | 70 74 72 20 3d 20 4e 55 |Ptr nnrd|ptr = NU|
|00000190| 4c 4c 3b 0d 0d 0d 23 64 | 65 66 69 6e 65 20 50 47 |LL;...#d|efine PG|
|000001a0| 53 55 43 43 45 53 53 09 | 54 52 55 45 0d 0d 0d 2f |SUCCESS.|TRUE.../|
|000001b0| 2a 20 70 75 74 20 75 70 | 20 61 20 6d 6f 64 65 6c |* put up| a model|
|000001c0| 65 73 73 20 64 69 61 6c | 6f 67 20 6e 6f 74 69 6e |ess dial|og notin|
|000001d0| 67 20 74 68 61 74 20 74 | 68 65 20 67 61 74 65 77 |g that t|he gatew|
|000001e0| 61 79 20 6f 72 20 68 6f | 73 74 20 69 73 20 6e 6f |ay or ho|st is no|
|000001f0| 74 0d 09 72 65 73 70 6f | 6e 64 69 6e 67 0d 2a 2f |t..respo|nding.*/|
|00000200| 0d 0d 73 65 74 6e 6e 72 | 28 29 0d 7b 0d 09 69 6e |..setnnr|().{..in|
|00000210| 74 09 69 74 65 6d 74 79 | 70 65 3b 0d 09 48 61 6e |t.itemty|pe;..Han|
|00000220| 64 6c 65 09 69 74 65 6d | 68 3b 0d 09 52 65 63 74 |dle.item|h;..Rect|
|00000230| 09 69 74 65 6d 62 6f 78 | 3b 0d 09 47 72 61 66 50 |.itembox|;..GrafP|
|00000240| 74 72 09 6f 70 6f 72 74 | 3b 0d 09 65 78 74 65 72 |tr.oport|;..exter|
|00000250| 6e 20 69 6e 74 20 6d 6f | 64 61 6c 64 69 61 6c 6f |n int mo|daldialo|
|00000260| 67 3b 0d 09 0d 09 69 66 | 20 28 6d 6f 64 61 6c 64 |g;....if| (modald|
|00000270| 69 61 6c 6f 67 29 0d 09 | 09 72 65 74 75 72 6e 28 |ialog)..|.return(|
|00000280| 30 29 3b 0d 0d 09 43 6f | 75 6c 64 44 69 61 6c 6f |0);...Co|uldDialo|
|00000290| 67 28 4e 4e 52 44 4c 4f | 47 29 3b 0d 0d 09 69 66 |g(NNRDLO|G);...if|
|000002a0| 20 28 49 63 45 63 68 6f | 52 65 71 75 65 73 74 28 | (IcEcho|Request(|
|000002b0| 72 6e 65 74 2d 3e 6e 5f | 64 65 66 67 77 2c 20 30 |rnet->n_|defgw, 0|
|000002c0| 29 20 21 3d 20 50 47 53 | 55 43 43 45 53 53 29 20 |) != PGS|UCCESS) |
|000002d0| 7b 0d 09 09 2f 2a 20 74 | 68 65 20 67 61 74 65 77 |{.../* t|he gatew|
|000002e0| 61 79 20 69 73 20 70 72 | 65 73 75 6d 61 62 6c 79 |ay is pr|esumably|
|000002f0| 20 64 6f 77 6e 20 2a 2f | 0d 09 09 50 61 72 61 6d | down */|...Param|
|00000300| 54 65 78 74 28 22 5c 50 | 47 61 74 65 77 61 79 22 |Text("\P|Gateway"|
|00000310| 2c 20 22 5c 50 22 2c 20 | 22 5c 50 22 2c 20 22 5c |, "\P", |"\P", "\|
|00000320| 50 22 29 3b 0d 09 7d 0d | 09 65 6c 73 65 20 7b 0d |P");..}.|.else {.|
|00000330| 09 09 48 4c 6f 63 6b 28 | 6b 65 79 64 70 2d 3e 68 |..HLock(|keydp->h|
|00000340| 68 6f 73 74 6e 61 6d 65 | 29 3b 0d 09 09 50 61 72 |hostname|);...Par|
|00000350| 61 6d 54 65 78 74 28 22 | 5c 50 68 6f 73 74 22 2c |amText("|\Phost",|
|00000360| 20 2a 6b 65 79 64 70 2d | 3e 68 68 6f 73 74 6e 61 | *keydp-|>hhostna|
|00000370| 6d 65 2c 20 22 5c 50 22 | 2c 20 22 5c 50 22 29 3b |me, "\P"|, "\P");|
|00000380| 0d 09 09 48 55 6e 6c 6f | 63 6b 28 6b 65 79 64 70 |...HUnlo|ck(keydp|
|00000390| 2d 3e 68 68 6f 73 74 6e | 61 6d 65 29 3b 0d 09 7d |->hhostn|ame);..}|
|000003a0| 0d 0d 09 69 66 20 28 21 | 6e 6e 72 75 70 29 0d 09 |...if (!|nnrup)..|
|000003b0| 09 2f 2a 20 62 65 63 61 | 75 73 65 20 49 63 45 63 |./* beca|use IcEc|
|000003c0| 68 6f 52 65 71 75 65 73 | 74 20 62 6c 6f 63 6b 73 |hoReques|t blocks|
|000003d0| 2c 20 6d 61 6b 65 20 73 | 75 72 65 20 74 68 65 20 |, make s|ure the |
|000003e0| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 69 73 20 73 74 |connecti|on is st|
|000003f0| 69 6c 6c 20 62 61 64 21 | 20 2a 2f 0d 09 09 72 65 |ill bad!| */...re|
|00000400| 74 75 72 6e 28 30 29 3b | 0d 0d 09 69 66 20 28 63 |turn(0);|...if (c|
|00000410| 68 6b 62 61 63 6b 67 72 | 6f 75 6e 64 28 29 29 0d |hkbackgr|ound()).|
|00000420| 09 09 72 65 74 75 72 6e | 28 30 29 3b 0d 09 09 0d |..return|(0);....|
|00000430| 09 65 6d 77 64 65 61 63 | 74 69 76 61 74 65 28 29 |.emwdeac|tivate()|
|00000440| 3b 0d 09 69 66 20 28 28 | 6e 6e 72 64 70 74 72 20 |;..if ((|nnrdptr |
|00000450| 3d 20 47 65 74 4e 65 77 | 44 69 61 6c 6f 67 28 4e |= GetNew|Dialog(N|
|00000460| 4e 52 44 4c 4f 47 2c 4e | 55 4c 4c 2c 28 57 69 6e |NRDLOG,N|ULL,(Win|
|00000470| 64 6f 77 50 74 72 29 20 | 28 2d 31 29 29 29 20 3d |dowPtr) |(-1))) =|
|00000480| 3d 20 4e 55 4c 4c 29 0d | 09 20 20 20 72 65 74 75 |= NULL).|. retu|
|00000490| 72 6e 20 28 30 29 3b 0d | 0d 09 63 65 6e 74 65 72 |rn (0);.|..center|
|000004a0| 77 69 6e 64 28 6e 6e 72 | 64 70 74 72 29 3b 0d 0d |wind(nnr|dptr);..|
|000004b0| 09 47 65 74 50 6f 72 74 | 28 26 6f 70 6f 72 74 29 |.GetPort|(&oport)|
|000004c0| 3b 0d 09 53 65 74 50 6f | 72 74 28 6e 6e 72 64 70 |;..SetPo|rt(nnrdp|
|000004d0| 74 72 29 3b 0d 0d 09 53 | 65 74 43 75 72 73 6f 72 |tr);...S|etCursor|
|000004e0| 28 26 61 72 72 6f 77 29 | 3b 0d 09 73 68 6f 77 63 |(&arrow)|;..showc|
|000004f0| 75 72 73 6f 72 28 29 3b | 0d 0d 09 44 72 61 77 44 |ursor();|...DrawD|
|00000500| 69 61 6c 6f 67 28 6e 6e | 72 64 70 74 72 29 3b 0d |ialog(nn|rdptr);.|
|00000510| 0d 09 53 65 74 50 6f 72 | 74 28 6f 70 6f 72 74 29 |..SetPor|t(oport)|
|00000520| 3b 0d 09 72 65 74 75 72 | 6e 28 30 29 3b 0d 7d 0d |;..retur|n(0);.}.|
|00000530| 0d 0d 2f 2a 20 64 69 73 | 70 6f 73 65 20 6f 66 20 |../* dis|pose of |
|00000540| 74 68 65 20 6e 65 74 77 | 6f 72 6b 20 6e 6f 74 20 |the netw|ork not |
|00000550| 72 65 73 70 6f 6e 64 69 | 6e 67 20 61 6c 65 72 74 |respondi|ng alert|
|00000560| 20 2a 2f 0d 0d 63 6c 65 | 61 72 6e 6e 72 28 29 0d | */..cle|arnnr().|
|00000570| 7b 0d 09 69 66 20 28 6e | 6e 72 64 70 74 72 20 3d |{..if (n|nrdptr =|
|00000580| 3d 20 4e 55 4c 4c 29 0d | 09 20 20 20 72 65 74 75 |= NULL).|. retu|
|00000590| 72 6e 3b 0d 09 44 69 73 | 70 6f 73 44 69 61 6c 6f |rn;..Dis|posDialo|
|000005a0| 67 28 6e 6e 72 64 70 74 | 72 29 3b 0d 09 46 72 65 |g(nnrdpt|r);..Fre|
|000005b0| 65 44 69 61 6c 6f 67 28 | 4e 4e 52 44 4c 4f 47 29 |eDialog(|NNRDLOG)|
|000005c0| 3b 0d 09 6e 6e 72 64 70 | 74 72 20 3d 20 4e 55 4c |;..nnrdp|tr = NUL|
|000005d0| 4c 3b 0d 7d 0d 0d 0d 6e | 6e 72 72 65 66 72 65 73 |L;.}...n|nrrefres|
|000005e0| 68 28 74 68 65 77 69 6e | 64 29 0d 57 69 6e 64 6f |h(thewin|d).Windo|
|000005f0| 77 50 74 72 20 74 68 65 | 77 69 6e 64 3b 0d 7b 0d |wPtr the|wind;.{.|
|00000600| 2f 2a 0d 09 69 66 20 28 | 6e 6e 72 64 70 74 72 20 |/*..if (|nnrdptr |
|00000610| 21 3d 20 4e 55 4c 4c 29 | 0d 09 09 69 66 20 28 74 |!= NULL)|...if (t|
|00000620| 68 65 77 69 6e 64 20 3d | 3d 20 6e 6e 72 64 70 74 |hewind =|= nnrdpt|
|00000630| 72 29 0d 09 09 09 44 72 | 61 77 44 69 61 6c 6f 67 |r)....Dr|awDialog|
|00000640| 28 6e 6e 72 64 70 74 72 | 29 3b 0d 2a 2f 0d 7d 0d |(nnrdptr|);.*/.}.|
|00000650| 0d 0d 2f 2a 20 64 69 73 | 70 6c 61 79 20 74 68 65 |../* dis|play the|
|00000660| 20 6e 65 74 77 6f 72 6b | 20 6e 6f 74 20 72 65 73 | network| not res|
|00000670| 70 6f 6e 64 69 6e 67 20 | 61 6c 65 72 74 20 2a 2f |ponding |alert */|
|00000680| 0d 0d 73 68 6f 77 6e 6e | 72 28 29 0d 7b 0d 09 69 |..shownn|r().{..i|
|00000690| 66 20 28 6e 6e 72 64 70 | 74 72 20 21 3d 20 4e 55 |f (nnrdp|tr != NU|
|000006a0| 4c 4c 29 20 7b 0d 09 09 | 53 68 6f 77 57 69 6e 64 |LL) {...|ShowWind|
|000006b0| 6f 77 28 6e 6e 72 64 70 | 74 72 29 3b 0d 09 09 42 |ow(nnrdp|tr);...B|
|000006c0| 72 69 6e 67 54 6f 46 72 | 6f 6e 74 28 6e 6e 72 64 |ringToFr|ont(nnrd|
|000006d0| 70 74 72 29 3b 0d 09 09 | 53 65 74 43 75 72 73 6f |ptr);...|SetCurso|
|000006e0| 72 28 26 61 72 72 6f 77 | 29 3b 0d 09 09 73 68 6f |r(&arrow|);...sho|
|000006f0| 77 63 75 72 73 6f 72 28 | 29 3b 0d 09 7d 0d 7d 0d |wcursor(|);..}.}.|
|00000700| 0d 0d 2f 2a 20 68 69 64 | 65 20 74 68 65 20 6e 65 |../* hid|e the ne|
|00000710| 74 77 6f 72 6b 20 6e 6f | 74 20 72 65 73 70 6f 6e |twork no|t respon|
|00000720| 64 69 6e 67 20 61 6c 65 | 72 74 20 2a 2f 0d 0d 68 |ding ale|rt */..h|
|00000730| 69 64 65 6e 6e 72 28 29 | 0d 7b 0d 09 69 66 20 28 |idennr()|.{..if (|
|00000740| 6e 6e 72 64 70 74 72 20 | 21 3d 20 4e 55 4c 4c 29 |nnrdptr |!= NULL)|
|00000750| 20 7b 0d 09 09 48 69 64 | 65 57 69 6e 64 6f 77 28 | {...Hid|eWindow(|
|00000760| 6e 6e 72 64 70 74 72 29 | 3b 0d 09 09 53 65 6e 64 |nnrdptr)|;...Send|
|00000770| 42 65 68 69 6e 64 28 6e | 6e 72 64 70 74 72 29 3b |Behind(n|nrdptr);|
|00000780| 0d 09 7d 0d 7d 0d 0d 00 | 00 00 00 00 00 00 00 00 |..}.}...|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000810| 3b 0d 09 72 65 74 75 72 | 6e 28 30 29 3b 0d 7d 0d |;..retur|n(0);.}.|
|00000820| 0d 63 6c 65 61 72 6e 6e | 72 28 29 0d 7b 0d 09 69 |.clearnn|r().{..i|
|00000830| 05 6e 6e 72 2e 63 02 00 | 00 00 50 61 72 74 53 49 |.nnr.c..|..PartSI|
|00000840| 54 78 00 00 00 00 00 00 | 00 00 00 01 8b d8 00 00 |Tx......|........|
|00000850| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00000860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000870| 00 00 a9 8d 3a 70 00 00 | 00 00 00 00 01 7e 09 6e |....:p..|.....~.n|
|00000880| 6e 72 64 70 74 72 20 3d | 20 4e 55 4c 4c 3b 0d 7d |nrdptr =| NULL;.}|
|00000890| 0d 0d 6e 6e 72 72 65 66 | 72 65 73 68 28 74 68 65 |..nnrref|resh(the|
|000008a0| 77 69 6e 64 29 0d 57 69 | 6e 64 6f 77 50 74 72 20 |wind).Wi|ndowPtr |
|000008b0| 74 68 65 77 69 6e 64 3b | 0d 7b 0d 2f 2a 0d 09 69 |thewind;|.{./*..i|
|000008c0| 66 20 28 6e 6e 72 64 70 | 74 72 20 21 3d 20 4e 55 |f (nnrdp|tr != NU|
|000008d0| 4c 4c 29 0d 09 09 69 66 | 20 28 74 68 65 77 69 6e |LL)...if| (thewin|
|000008e0| 64 20 3d 3d 20 6e 6e 72 | 64 70 74 72 29 0d 09 09 |d == nnr|dptr)...|
|000008f0| 09 44 72 61 77 44 69 61 | 6c 6f 67 28 6e 6e 72 64 |.DrawDia|log(nnrd|
|00000900| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 ff 00 d5 |...H..Mo|naco....|
|00000910| 00 00 00 14 00 01 6b 94 | 00 0a 00 00 00 00 00 00 |......k.|........|
|00000920| 00 00 00 dc 00 00 00 06 | 00 04 00 27 00 00 01 e1 |........|...'....|
|00000930| 02 00 00 27 00 00 01 e1 | 02 00 a4 e9 64 39 00 00 |...'....|....d9..|
|00000940| 00 f5 00 00 00 f5 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00000950| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 12 6b 38 |...L...L|...2..k8|
|00000960| 0c 20 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |. .....2|..MPSR..|
|00000970| 00 0a 03 ed ff ff 00 00 | 00 00 00 13 a1 04 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+